package cn.sfturing.service.impl;

import cn.sfturing.dao.ControlMapper;
import cn.sfturing.entity.Control;
import cn.sfturing.service.ControlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ControlServiceImpl implements ControlService {

    @Autowired
    ControlMapper controlMapper;


    @Override
    public boolean updateByPrimaryKey(Control control) {

        return controlMapper.updateByPrimaryKey(control)>0?true:false;
    }

    @Override
    public Control selectByHospitalName(String hospitalName) {

        return controlMapper.selectByHospitalName(hospitalName);
    }

    @Override
    public boolean deleteByuserId(Integer userId) {

        return controlMapper.deleteByuserId(userId)>0?true:false;
    }

    @Override
    public boolean updateByPrimaryKeySelective(Control control) {
        return controlMapper.updateByPrimaryKeySelective(control)>0?true:false;
    }

    @Override
    public Control selectByuserId(Integer userId) {
        return controlMapper.selectByuserId(userId);
    }

    @Override
    public boolean insertSelective(Control record) {
        return controlMapper.insertSelective(record)>0?true:false;
    }
}
